<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.dfs.php';
require '../visual/visual.dfs.php';
require '../core/core.time.php';
require '../core/core.statistics.php';
$conflicts=0;
$login=new core_security;
if ($login->checklogin()=="OK" AND $_SESSION['role']<=2) {
$loc=new loc;
$time=new core_time;

$timestart=strtotime($_POST['date']." 00:00:01");
$timestop=strtotime($_POST['date']." 23:59:59");
$query="select jdesc,note,sum(duration) as dur from userjobs WHERE from_ >= ".$timestart." AND to_ <= ".$timestop." AND uid = ".$_POST['uid']." GROUP BY jid";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
if (isset($row['jdesc'])) {
echo "<table>";
echo "<tr><td width='300'>".$row['jdesc']."</td><td width='100'>".$time->tohm($row['dur'])."</td><td width='200'>".$row['note']."</td></tr>";
while ($row=mysql_fetch_array($result)) {
	echo "<tr><td width='300'>".$row['jdesc']."</td><td width='100'>".$time->tohm($row['dur'])."</td><td width='200'>".$row['note']."</td></tr>";
	}
echo "</table>";
}

}
?>
